package com.hu.bgp.server;

import com.hu.bgp.shared.BgpMessage;

import de.novanic.eventservice.client.event.Event;
import de.novanic.eventservice.client.event.domain.Domain;
import de.novanic.eventservice.service.registry.EventRegistryFactory;

/**
 * De context voor een lopend spelletje.
 * 
 * @author ejvos
 */
public class GameContext implements com.hu.bgp.framework.GameContext
{
	private Domain gameDomain;

	public GameContext(Domain gameDomain)
	{
		super();
		this.gameDomain = gameDomain;
	}

	public Domain getGameDomain()
	{
		return gameDomain;
	}

	public void broadCastMessage(String payload) {
		BgpMessage msg = new BgpMessage(payload);
		
		EventRegistryFactory.getInstance().getEventRegistry().addEvent(
				gameDomain, msg);
		
	}
}
